<template>
  <div class="home">
    <QuillEditor
      v-model:content="content"
      ref="quillEditorRef"
      content-type="html"
      toolbar="full"
    />
    <router-link to="/about" class="btn" @click="addTest">了解更多</router-link>
  </div>
</template>

<script setup>
// 组件逻辑
import { addTest } from "../hooks/useTest";
import { ref } from "vue";
import { QuillEditor } from "pxx-vue-quill";
import "pxx-vue-quill/dist/vue-quill.snow.css";

const content = ref("");
</script>

<style scoped>
.home {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

h1 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

p {
  color: #666;
  margin-bottom: 2rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.feature-card h3 {
  color: #495057;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: #6c757d;
  margin: 0;
}

.btn {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.btn:hover {
  background: #0056b3;
}
</style>
